package com.mall.user.domain.model;

public record GoodsRate(Long id) {
    public GoodsRate {
        //好评率最大值为100
        if (id > 100) {
            throw new IllegalArgumentException("好评率最大值为100");
        }
    }

    public static GoodsRate of(Long id) {
        return new GoodsRate(id);
    }
}
